import {defineStore } from 'pinia'
import { ref,computed} from 'vue'
export const useUserStore = defineStore("user_info", () => {
  
  const user = ref(null);
  const loginStatus = computed(() => {
    return user.value != null;
  })
  function setLoginInfo (data) {
    user.value = data;
  }

  return {
    user,
    setLoginInfo,
    loginStatus,
  };

})